import { object_Inf } from "@/utils/typings/index.type";

/*
 * @Descripttion:产品关联属性工具类
 * @LastEditors: xzh
 * @LastEditTime: 2023-09-20 23:33:05
 */
export default class ProductRelAttrUtils {
  /**
   * @Author: xzh
   * @Descripttion:产品关联属性映射
   * @Param:
   */
  static relAttrMap: object_Inf = {
    //t('page.systemManageArr.productArr.relAttrArr.productAttr')
    productAttr: "productAttr",
    //t('page.systemManageArr.productArr.relAttrArr.processAttr')
    processAttr: "processAttr",
  };
  /**
   * @Author: xzh
   * @Descripttion: 产品关联属性列
   * @Param:
   */
  static relAttrColumn: object_Inf = {
    //产品属性列
    [this.relAttrMap.productAttr]: [
      {
        field: "name",
        //t('page.systemManageArr.productArr.relAttrColumnArr.name')
        title: "page.systemManageArr.productArr.relAttrColumnArr.name",
        edit: false,
      },
      {
        field: "standardValue",
        //t('page.systemManageArr.productArr.relAttrColumnArr.standardValue')
        title: "page.systemManageArr.productArr.relAttrColumnArr.standardValue",
      },
      {
        field: "max",
        //t('page.systemManageArr.productArr.relAttrColumnArr.max')
        title: "page.systemManageArr.productArr.relAttrColumnArr.max",
      },
      {
        field: "min",
        //t('page.systemManageArr.productArr.relAttrColumnArr.min')
        title: "page.systemManageArr.productArr.relAttrColumnArr.min",
      },
    ],
    //制程属性列
    [this.relAttrMap.processAttr]: [
      {
        field: "processName",
        //t('page.systemManageArr.productArr.relAttrColumnArr.processName')
        title: "page.systemManageArr.productArr.relAttrColumnArr.processName",
        edit: false,
      },
      {
        field: "name",
        //t('page.systemManageArr.productArr.relAttrColumnArr.name')
        title: "page.systemManageArr.productArr.relAttrColumnArr.name",
      },
      {
        field: "standardValue",
        //t('page.systemManageArr.productArr.relAttrColumnArr.standardValue')
        title: "page.systemManageArr.productArr.relAttrColumnArr.standardValue",
      },
      {
        field: "remark",
        //t('common.remark')
        title: "common.remark",
      },
    ],
  };
  /**
   * @Author: xzh
   * @Descripttion: 产品关联属性固定行
   * @Param:
   */
  static relAttrFixRow: object_Inf = {
    //产品属性列
    [this.relAttrMap.productAttr]: [
      {
        value: "slurryRatio",
        //t('page.systemManageArr.productArr.relAttrFixRowArr.slurryRatio')
        label: "page.systemManageArr.productArr.relAttrFixRowArr.slurryRatio",
      },
      {
        value: "pulpDensity",
        //t('page.systemManageArr.productArr.relAttrFixRowArr.pulpDensity')
        label: "page.systemManageArr.productArr.relAttrFixRowArr.pulpDensity",
      },
      {
        value: "pulpBuckleDegree",
        //t('page.systemManageArr.productArr.relAttrFixRowArr.pulpBuckleDegree')
        label:
          "page.systemManageArr.productArr.relAttrFixRowArr.pulpBuckleDegree",
      },
    ],
    //制程属性列
    [this.relAttrMap.processAttr]: [
      {
        value: "shaping",
        //t('page.systemManageArr.productArr.relAttrColumnArr.shaping')
        label: "page.systemManageArr.productArr.relAttrColumnArr.shaping",
      },
      {
        value: "cutEdgeOutput",
        //t('page.systemManageArr.productArr.relAttrColumnArr.cutEdgeOutput')
        label: "page.systemManageArr.productArr.relAttrColumnArr.cutEdgeOutput",
      },
      {
        value: "AOI",
        //t('page.systemManageArr.productArr.relAttrColumnArr.AOI')
        label: "page.systemManageArr.productArr.relAttrColumnArr.AOI",
      },
    ],
  };
}
